﻿using JESAI.DDD.Entities;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JESAI.Platform.Domain.Sys.Entities
{
    [SugarTable("mlt_sys_fields")]
    public class FormFieldEntity : IEntity<string>
    {
        /// <summary>
        /// 主键ID
        /// </summary>
        [SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = false)]
        public string Id { get; set; }

        /// <summary>
        /// 对应表单表的ID
        /// </summary>
        public string FormId { get; set; }

        /// <summary>
        /// 字段名称，用于标识字段的唯一标识
        /// </summary>
        public string Field { get; set; }

        /// <summary>
        /// 字段显示标签，用户界面上显示的文本
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// 字段类型，如：input、select、textarea等
        /// </summary>
        public string Type { get; set; }

        /// <summary>
        /// 字段的附加属性（例如：选择框的选项）
        /// </summary>
        public string Options { get; set; }

        /// <summary>
        /// 组件配置项（例如：{ required: true, min: 5 }）
        /// </summary>
        public string Props { get; set; }

        /// <summary>
        /// 字段的值
        /// </summary>
        public string Value { get; set; }

        /// <summary>
        /// 组件的完整规则
        public string Rule { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime UpdateTime { get; set; }
    }
}
